from Tkinter import Tk, Frame, Checkbutton
from Tkinter import IntVar, BOTH

class CheckButtonWidget(Frame):
    def __init__(self, parent):
        Frame.__init__(self, parent)
        
        self.parent = parent
        
        self.initUI()
        
    def initUI(self):
        self.parent.title("Check Button")
        
        self.pack(fill=BOTH, expand=1)
        
        self.var = IntVar()
        
        print self.var, '----', self.var.__class__
        
        cb = Checkbutton(self, text="Show Title", variable = self.var, command= self.onClick)
        cb.select()
        cb.place(x=50, y=50)
        
    def onClick(self):
        print self.var.get()
        if self.var.get() == 1:
            self.master.title("Check Button")
        else:
            self.master.title("")
            
            
def main():
    root = Tk()
    root.geometry("250x150+300+300")
    app = CheckButtonWidget(root)
    root.mainloop()  
    
if __name__ == '__main__':
    main()